package com.dongdong.api;



import com.dongdong.back.SellerBackFactory;
import com.dongdong.model.TbSeller;
import com.dongdong.result.Result;
import com.dongdong.vo.TbSellerVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

//@FeignClient("dongdong-seller-services")    //正常的远程调用
//fallbackFactory = SellerServiceApi.class   用于解决 sentinel流控问题  走降级逻辑
@FeignClient(value = "dongdong-seller-services",fallbackFactory = SellerBackFactory.class)
public interface SellerServiceApi {   //openfeign的远程调用 映射对应方法
    @GetMapping("/seller/selectSellerByUsername")
    public TbSeller selectSellerByUsername(@RequestParam String name);

    @GetMapping("/seller/selectSellerBySellerId")
    public TbSeller selectSellerBySellerId(@RequestParam String sellerId);


    @GetMapping("/seller/unameseller")  //注册时保障账号唯一性
    public int unameseller ( @RequestParam String uname);
    //注册
    @PostMapping("/seller/sellerregiestadd")
    public Result sellerregiestadd(@RequestBody TbSellerVO sellerVO);

















}
